﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Presentation;

namespace PresentationTest
{
    class ImageView : IView
    {
        public string CharacterString { get; set; }
        public string HuffmanCode { get; set; }
        public string Status { get; set; }
        public string CharToCode { get; set; }
        public string CodeToChar { get; set; }
        public string Log { get; set; }

        public event Action OnEncode;
        public event Action OnDecode;
        public event Action OnStringChanged;
        public event Action OnCodeChanged;
        public event Action OnBuildTree;

        public ImageView()
        {
            CharacterString = "";
            HuffmanCode = "";
            Status = "";
            CharToCode = "";
            CodeToChar = "";
            Log = "";
        }

        public void ClickEncode()
        {
            OnEncode();
        }

        public void ClickDecode()
        {
            OnDecode();
        }

        public void ClickBuildTree()
        {
            OnBuildTree();
        }

        public void ChangeString()
        {
            OnStringChanged();
        }

        public void ChangeCode()
        {
            OnCodeChanged();
        }
    }
}
